GBML manual / Constants

SPRITECOLOR_FIRE

Fire: the color is pale yellow at the top of the screen, then orange, then red, then dark red at the bottom.

Works differently on Game Boy - On the Game Boy the look changes one shade of the sprite in bands (see sprite_color_look); one such look runs at a time.

Works differently on Game Boy Color - On the Game Boy Color the look's colors go row by row into one color of the sprite's palette (see sprite_color_look); one such row-by-row color runs at a time.

Sega Genesis: not built yet

On other consoles this differs: see Side by side and How the consoles differ.

Syntax

SPRITECOLOR_FIRE: constant

<!-- GENERATED by tools/gbabel_looks.py from its LOOKS registry. Never edit this page: change the registry and re-run it. -->

Description

Names the fire, for sprite_color_look. The color you picked is a pale yellow-white on the top row of the screen, then bright orange, then a hot red, and a dark ember red on the bottom row. Pick the color of a flame, or of a glowing sword, and it looks hot.

strength is how rich the colors are: 1 is a pale, ashy fire, 2 is in between and 3 is full fire.

A real capture, four pictures of the same striped lighthouse - first in its own colors, then with SPRITECOLOR_FIRE on its red stripes at strength 1, 2 and 3 (the stripes turn orange, a pale peach at strength 1 and a deep orange at strength 3) - the colors held in the same place each timeA real capture, four pictures of the same striped lighthouse - first in its own colors, then with SPRITECOLOR_FIRE on its red stripes at strength 1, 2 and 3 (the stripes turn orange, a pale peach at strength 1 and a deep orange at strength 3) - the colors held in the same place each time
A real capture, four pictures of the same striped lighthouse - first in its own colors, then with SPRITECOLOR_FIRE on its red stripes at strength 1, 2 and 3 (the stripes turn orange, a pale peach at strength 1 and a deep orange at strength 3) - the colors held in the same place each time

The same picture four times: straight, then strength 1, 2 and 3 from left to right, each one standing still where the pattern had got to. Real pictures from a Game Boy Advance ROM.

speed is how many rows the colors slide down the screen every frame. 0 holds them still, a negative number sends them up, 0.25 is slow and 1 is quick. The colors belong to the rows of the screen, so a sprite that moves down the screen passes through them.

A real capture, 16 frames played in a loop - the red stripes of the lighthouse glow from yellow to orange to red as the colors slide down the screenA real capture, 16 frames played in a loop - the red stripes of the lighthouse glow from yellow to orange to red as the colors slide down the screen
A real capture, 16 frames played in a loop - the red stripes of the lighthouse glow from yellow to orange to red as the colors slide down the screen

The pattern moving, sped up: sixteen real pictures four frames apart, played 70 milliseconds each, at strength 3. It is a whole turn of the pattern, so the loop has no seam. This picture is an animated PNG; a viewer that cannot animate shows its first frame.

Example

sprite_color_look(spr_doc_hero, 3, SPRITECOLOR_FIRE, 2, 0.5);

A color that glows like fire. Call it once, for example when the room starts - it keeps going by itself until you call sprite_color_look(spr_doc_hero, 3, SPRITECOLOR_NONE, 0, 0) or a room is loaded.

See also: sprite_color_lookSPRITECOLOR_NONESPRITECOLOR_ICE